﻿using CkSoftware.GroupMe.Sdk.Core;
using CkSoftware.GroupMe.Sdk.Groups.Commands;
using Newtonsoft.Json;

namespace CkSoftware.GroupMe.Sdk.Groups.Dao
{
	/// <summary>
	/// Parameters for the <see cref="GroupIndexCommand"/>.
	/// </summary>
	public class GroupIndexParameters : IWebApiCommandParameters
	{
		private const int DefaultItemsPerPage = 10;
		private const int DefaultPageNumber = 1;

		/// <summary>
		/// Instantiate a new <see cref="GroupIndexParameters" />.
		/// </summary>
		public GroupIndexParameters()
		{
			PageNumber = DefaultPageNumber;
			ItemsPerPage = DefaultItemsPerPage;
		}

		/// <summary>
		/// The number of items per page.
		/// </summary>
		[JsonProperty(PropertyName = "per_page")]
		public int ItemsPerPage { get; set; }

		/// <summary>
		/// The page-number to display.
		/// </summary>
		[JsonProperty(PropertyName = "page")]
		public int PageNumber { get; set; }
	}
}